# -*- coding: utf-8 -*-
import random
import os

class 玄门教学:
    def __init__(self):
        self.八卦 = ['乾', '坤', '震', '巽', '坎', '离', '艮', '兑']
        
    def 起卦(self):
        卦象 = random.sample(self.八卦, 3)
        print(f"今日卦象：{''.join(卦象)}")
        return self.解卦(卦象)
    
    def 解卦(self, 卦象):
        解卦词典 = {
            '乾坤震': '宜静修，利学习',
            '巽坎离': '利合作，忌独行',
            '艮兑坤': '财运至，需谨慎'
        }
        return 解卦词典.get(''.join(卦象), "卦象需自悟")

# 创建五行目录
for 元素 in ["金","木","水","火","土"]:
    # os.mkdir(元素)
    # open(f"{元素}/README.md", "w").write(f"# {元素}系功法")
    print(f"# {元素}系功法")

if __name__ == "__main__":
    教学系统 = 玄门教学()
    print(教学系统.起卦())
